android studio set text of textview

49

android studio set text of textview -

// globally 
TextView myAwesomeTextView = (TextView)findViewById(R.id.myAwesomeTextView);

//in your OnCreate() method
myAwesomeTextView.setText("My Awesome Text");

how to set text in textview in android kotlin -

// Load and use views afterwards
val tv1: TextView = findViewById(R.id.textView1)
tv1.text = "Hello"

Comments

Submit
0 Comments